package com.zkr.service;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.util.Date;
@Configuration
@Component
@EnableScheduling // 该注解必须要加
/**
 *
 * 功能描述:
 * @author:mayue
 * @date: 2018/8/30 下午 7:32
 *
 */
public class ScheduleTaskService {
    public void scheduleTest(){
        Date day=new Date();
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println(df.format(day));

    }
}
